/**
 * 
 */
package com.asa.photopicker.photo;

import android.graphics.Bitmap;
import android.support.v4.util.LruCache;

/**
 * The class to implement the bitmap LRU cache mechanism.
 * 
 */
public class BitmapLruCache extends LruCache<String, Bitmap> {

    public BitmapLruCache(int maxSizeInBytes) {
        super(maxSizeInBytes);
    }

    @Override
    public int sizeOf(String key, Bitmap value) {
        return value.getRowBytes() * value.getHeight();
    }
}
